#!/bin/bash

export JAVA_HOME=/huanghefd/twotickets/jdk1.8.0_181;
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib;
export PATH=$JAVA_HOME/bin:$PATH;


count=`lsof -t -i:18080| wc -l`
if [ $count -eq 0 ];then
        echo "process not found."
else
        echo "find java process: "`lsof -t -i:18080`
        kill -9 `lsof -t -i:18080`
fi

nohup java -Xms512m -Xmx2048m -jar /huanghefd/twotickets/ruoyi-admin.jar  --server.port=18080 >>/huanghefd/twotickets/logs/huanghefd.log 2>&1 &